package com.zdy.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.zdy.showgoods.R;

import java.util.List;

public class MyAdapter extends BaseAdapter {
    private Context mContext;
    private List<String> indicators;

    public MyAdapter(Context context, List<String> indicators) {
        this.mContext = context;
        this.indicators = indicators;
    }

    @Override
    public int getCount() {
        return indicators.size();
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        TextView view = (TextView) LayoutInflater.from(mContext).inflate(R.layout.item_indicator, null);
        view.setText(indicators.get(position));
        return view;
    }
}